﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BankingService
{
    public class LeagueBankAuthentication : Authentication
    {
        public LeagueBankAuthentication() { }

        protected override bool KiemTraTaiKhoanHopLe(String username, String password)
        {
            return MyUtility.ThuocTaiKhoanNganHangLienMinh(username, password);
        }

        protected override void LuuSIDXuongCSDL(String strSID)
        {
            SID_NganHang SID = new SID_NganHang
            {
                sid = strSID,
                Time = DateTime.Now,
            };

            context.SID_NganHangs.InsertOnSubmit(SID);
            try
            {
                context.SubmitChanges();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
    }
}
